﻿/*-------------------------------------------------------------------------
* 命名空间: ScreenCapture.Models/MessageProvider
* 类       名: MessageProvider
* 功      能:  TD
* 时      间:  2023/12/5 14:29:29
* 版      本:  V1.0
* 作      者:  Fioman
* 格      言:  Talk is cheap,show me the code ^_^
*-------------------------------------------------------------------------*/
using FirstFloor.ModernUI.Windows.Controls;
using ScreenCapture.Base.Services;
using ScreenCapture.Loc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace ScreenCapture.Models
{
    public class MessageProvider : IMessageProvider
    {
        private readonly IAudioPlayer? _audioPlayer;
        private readonly ILocalizationProvider? _loc;

        public MessageProvider(IAudioPlayer AudioPlayer, ILocalizationProvider Loc)
        {
            _audioPlayer = AudioPlayer;
            _loc = Loc;
        }

        public void ShowError(string Message, string? Header = null)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                var dialog = new ModernDialog
                {
                    Title = _loc?.ErrorOccurred,
                };
            });
        }

        public void ShowException(Exception Exception, string Message, bool Blocking = false)
        {
            throw new NotImplementedException();
        }

        public bool ShowYesNo(string Message, string Title)
        {
            throw new NotImplementedException();
        }
    }
}
